describe('practice-3-4', function () {

    it("求小于256的数中，存在多少个数n，n的平方为回文数", function () {
        var arr_palindrome_number = get_palindrome_number();
        console.info('arr_palindrome_number:'+arr_palindrome_number);
        expect(arr_palindrome_number.length).toBe(11);
        for(var i = 0; i < arr_palindrome_number.length; i ++)
        {
            var number = arr_palindrome_number[i].number;
            var pow_num = arr_palindrome_number[i].pow_num;
            var str_pow_num = pow_num.toString();
            expect(Math.pow(number,2)).toBe(pow_num);
            for(var j = 0; j < str_pow_num.length; j ++)
            {
                if(str_pow_num.length - 1 - j < j)
                    break;
                expect(str_pow_num[j]).toBe(str_pow_num[str_pow_num.length - 1 - j]);
            }

        }
    });

});